import request from "@/utils/request.js";

export const createOrder = (orderData) => {
  return request.post('/order/addOrder', orderData)
}

export const payOrder = (orderNo) => {
  return request.post('/order/pay', {
    orderNo
  })
}

export const getOrderVerificationCode = (orderNo) => {
  return request.get('/order/generateQRCode', {
    orderNo
  }, {
    showLoading: false
  })
}

export const getOrderDetails = (orderNo) => {
  return request.get('/order/getOrderDetails', {
    orderNo
  })
}
export const getOrderList = (params) => {
  return request.get('/order/getOrderPage', params)
}
export const cancelOrder = (orderNo) => {
  return request.post('/order/cancelOrder', {
    orderNo
  })
}